package com.ruyuan.rapid.core.processor;

import com.ruyuan.rapid.core.context.HttpRequestWrapper;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 核心执行逻辑
 */
public class NettyCoreProcessor implements NettyProcessor{

    @Override
    public void process(HttpRequestWrapper httpRequestWrapper) {
        FullHttpRequest fullHttpRequest = httpRequestWrapper.getFullHttpRequest();
        ChannelHandlerContext ctx = httpRequestWrapper.getCtx();
        try {
            // 1. 解析 FullHttpRequest ,转换成我们想要的内部对象

            // 2.执行整个过滤器逻辑,filterChain

            System.out.println("接收到http请求");

        }catch (Throwable t){

        }

    }

    @Override
    public void start() {

    }

    @Override
    public void shutdown() {

    }
}
